#include<stdio.h>
#include<string.h>
int main()
{
	char arr1[101] = { 0 };
	char arr2[101] = { 0 };
	gets(arr1);
	gets(arr2);
	int k = 0;
	while (arr1[k])
	{
		if (strchr( arr2, arr1[k]) == NULL)
		{
			printf("%c", arr1[k]);
		}
		k++;
	}
	return 0;
}